//
//  LDBaseCompanyKindsCellTableViewCell.swift
//  DingDongZP
//
//  Created by 三秒文化 on 16/5/9.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

import UIKit

class LDBaseCompanyKindsCell: UITableViewCell {

    var imgView:UIImageView?
    var titleLab:UILabel?
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.selectionStyle = .None
        titleLab = UILabel.setDetailsLab("title", fontSize: 15, titleColor: LDFontColor.Black, Alignment: .Left)
        
        imgView = UIImageView.init(image: UIImage(named:"common_check"))
        
        addSubview(titleLab!)
        addSubview(imgView!)
        
        titleLab?.snp_makeConstraints(closure: { (make) in
            make.left.equalTo(LDMargin_V*4)
            make.centerY.equalTo(self)
            make.top.bottom.equalTo(0)
        })
        
        imgView?.snp_makeConstraints(closure: { (make) in
            make.right.equalTo(-LDMargin_H*2)
            make.centerY.equalTo(self)
            make.height.equalTo(12)
            make.width.equalTo(20)
        })
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func setSelected(selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        if selected == true {
            
            imgView?.hidden = false
        } else {
            imgView?.hidden = true
        }
    }

}
